package com.guo.copy;

/**
 * @author gonghuaiguo
 */
public class CopyTest {

    public static void main(String[] args) throws CloneNotSupportedException {
        Address address = new Address();
        Address clone = address.clone();
        System.out.println(clone.name = "李四");
        System.out.println(address.name);
        System.out.println(clone.name);

        Person person = new Person();
        Person newPerson = person.clone();
        System.out.println(person.address == newPerson.address);
    }
}
